***********************************************************************************
** Table 1 Analysis: XTNBREG, rank attention ratio^2, ITERATE data, 1990-2004    **
**                                                                           	 **
***********************************************************************************

*Bivariate negative binomial model between deadly attacks and the ratio of ranked eventcounts to total number of states in the sytem
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio
estimates store Model1
*mcp newrank_attention_ratio, at1(.01 .25 .49 .73 .98) ci

*Multivariate model including control for press freedom
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree
estimates store Model2

**Multivariate model including the number of terrorist groups in a given year (group competition)
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree ngroups
estimates store Model3

*Multivariate model including the number of rivalries in a given year
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree ngroups rivnumb
estimates store Model4

*Multivariate adding in military capability (CINC)
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree ngroups rivnumb cap
estimates store Model5

*Multivariate model adding in Savun and Philips variables
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree ngroups rivnumb cap usalliance interventions crisis
estimates store Model6

*Multivariate model controlling for regime type
xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree ngroups rivnumb cap usalliance interventions crisis polity2
estimates store Model7
*mcp newrank_attention_ratio, at(fh_pressfree=(0) rivnumb=(0) cap=(.006) usalliance=(0) interventions=(0) polity2=(1)) at1(.01 .25 .49 .73 .98) ci



*******************************************************************************
**                                                                           **
**     Figure 1: Average rank press attention scores, 16 countries 1990-2004 **
**                                                                           **
*******************************************************************************

// To create Figure 1: Export the values generated using the commands listed in this section into Excel.

*USA
sum newrank_attention_ratio if strtloc==2

*France
sum newrank_attention_ratio if strtloc==220 

*Indonesia
sum newrank_attention_ratio if strtloc==850 

*China
sum newrank_attention_ratio if strtloc==710

*Egypt
sum newrank_attention_ratio if strtloc==651

*Turkey
sum newrank_attention_ratio if strtloc==640 

*Russia
sum newrank_attention_ratio if strtloc==365 

*North Korea
sum newrank_attention_ratio if strtloc==731 

*Denmark
sum newrank_attention_ratio if strtloc==390

*Nigeria
sum newrank_attention_ratio if strtloc==475

*Ukraine
sum newrank_attention_ratio if strtloc==369

*Chile
sum newrank_attention_ratio if strtloc==155

*Iceland
sum newrank_attention_ratio if strtloc==395

*Democratic Republic of Congo
sum newrank_attention_ratio if strtloc==490

*Laos
sum newrank_attention_ratio if strtloc==812

*Uruguay
sum newrank_attention_ratio if strtloc==165


*******************************************************************************
**                                                                           **
**     Figure 2: Predictive Margins, ITERATE data, 1990-2004                 **
**                                                                           **
*******************************************************************************

xtnbreg deadly_attacks_lead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio bReuters fh_pressfree ngroups rivnumb cap usalliance interventions crisis polity2

** This command creates Figure 2. Uses Stata user-written program marginscontplot (P. Royston).  Must use Stata version 13 or above.
** findit marginscontplot

mcp2 newrank_attention_ratio, at(fh_pressfree=(0) rivnumb=(0) cap=(.006) usalliance=(0) interventions=(0) polity2=(1) ngroups=(3.3)) at1(.01 (.05) .98) margopts(predict(nu0)) ci



*****************************************************************************************
**                                                                          		   **
**     Figure 3: Reducing Relative Press Atention by 20% Influences Incidence          **
**     Use data from these commands in Excel to create Figure 3              		   **
*****************************************************************************************

//Step one: Run saturated model for estimating the number of deadly attacks in a given country in a given year
xtnbreg  deadly_attacks_lead  newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree rivnumb cap usalliance interventions crisis polity2  ngroups


//Step two: use Stata Margins command to estimate the change in predicted deadly attacks from reducing relative foreign press attention by 20% in selected countries


*Listing values of the covariates for USA and then estimating the change in predicted deadly attacks from closing a Reuters bureau in USA ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==2 & year==1995
margins, at(newrank_attention_ratio=(.96875 0.75875)  fh_pressfree=2  rivnumb=10 cap=0.1406412 usalliance=0 interventions=0 crisis=1 polity2=10 ngroups=9) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.96875 1) fh_pressfree=2  rivnumb=10 cap=0.1406412 usalliance=0 interventions=0 crisis=1 polity2=10 ngroups=9) predict(nu0)

*Listing values of the covariates for France and then estimating the change in predicted deadly attacks from closing a Reuters bureau in France ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==220 & year==1995
margins, at(newrank_attention_ratio=(.9479167 0.7279167) fh_pressfree=2  rivnumb=2 cap=0.250185 usalliance=1 interventions=0 crisis=0 polity2=9 ngroups=9) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.9479167 1) fh_pressfree=2  rivnumb=2 cap=0.250185 usalliance=1 interventions=0 crisis=0 polity2=9 ngroups=9) predict(nu0)

*Listing values of the covariates for Indonesia and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Indonesia ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==850 & year==1995
margins, at(newrank_attention_ratio=(0.8958333 0.6758333)  fh_pressfree=0  rivnumb=0 cap=0.141056 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=9) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.8958333 1)  fh_pressfree=0  rivnumb=0 cap=0.141056 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=9) predict(nu0)

*Listing values of the covariates for China and then estimating the change in predicted deadly attacks from closing a Reuters bureau in China ngroups=1
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==710 & year==1995
margins, at(newrank_attention_ratio=(.9322917 0.7122917)  fh_pressfree=0  rivnumb=6 cap=0.1355899 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=1) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.9322917 1)  fh_pressfree=0  rivnumb=6 cap=0.1355899 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=1) predict(nu0)

*Listing values of the covariates for Egypt and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Egypt ngroups=3
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==651 & year==1995
margins, at(newrank_attention_ratio=(.7916667 0.5716667)  fh_pressfree=0  rivnumb=2 cap=0.0085745 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=3) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.7916667 1)  fh_pressfree=0  rivnumb=2 cap=0.0085745 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=3) predict(nu0)

*Listing values of the covariates for Turkey and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Turkey ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==640 & year==1995
margins, at(newrank_attention_ratio=(.8385417 0.6185417)  fh_pressfree=0  rivnumb=7 cap=0.0157004 usalliance=1 interventions=0 crisis=0 polity2=8 ngroups=9) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.8385417 1)  fh_pressfree=0  rivnumb=7 cap=0.0157004 usalliance=1 interventions=0 crisis=0 polity2=8 ngroups=9) predict(nu0)

*Listing values of the covariates for Russia and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Russia ngroups=1
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==365 & year==1995
margins, at(newrank_attention_ratio=(.9270833 0.7070833)  fh_pressfree=1  rivnumb=12 cap=0.0610809 usalliance=0 interventions=0 crisis=0 polity2=3 ngroups=1) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.9270833 1)  fh_pressfree=1  rivnumb=12 cap=0.0610809 usalliance=0 interventions=0 crisis=0 polity2=3 ngroups=1) predict(nu0)

*Listing values of the covariates for North Korea and then estimating the change in predicted deadly attacks from closing a Reuters bureau in North Korea ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==731 & year==1995
margins, at(newrank_attention_ratio=(.6510417 0.4310417)  fh_pressfree=0  rivnumb=3 cap=0.0114064 usalliance=0 interventions=0 crisis=1 polity2=-10 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6510417 0.8710417)  fh_pressfree=0  rivnumb=3 cap=0.0114064 usalliance=0 interventions=0 crisis=1 polity2=-10 ngroups=0) predict(nu0)

*Listing values of the covariates for Denmark and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Denmark ngroups=1
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==390 & year==1995
margins, at(newrank_attention_ratio=(.6875 0.4675)  fh_pressfree=2  rivnumb=0 cap=0.0017194 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=1) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6875 0.9075)  fh_pressfree=2  rivnumb=0 cap=0.0017194 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=1) predict(nu0)

*Listing values of the covariates for Nigeria and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Nigeria ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==475 & year==1995
margins, at(newrank_attention_ratio=(.6770833 0.4570833)  fh_pressfree=0  rivnumb=2 cap=0.0070676 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6770833 0.8970833)  fh_pressfree=0  rivnumb=2 cap=0.0070676 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=0) predict(nu0)

*Listing values of the covariates for Ukraine and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Ukraine ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==369 & year==1995
margins, at(newrank_attention_ratio=(.6197917 0.3997917)  fh_pressfree=1  rivnumb=1 cap=0.0163135 usalliance=0 interventions=0 crisis=0 polity2=7 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6197917 0.8397917)  fh_pressfree=1  rivnumb=1 cap=0.0163135 usalliance=0 interventions=0 crisis=0 polity2=7 ngroups=0) predict(nu0)

*Listing values of the covariates for Chile and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Chile ngroups=4
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==155 & year==1995
margins, at(newrank_attention_ratio=(.6666667 0.4466667)  fh_pressfree=2  rivnumb=0 cap=0.0028856 usalliance=0 interventions=0 crisis=0 polity2=8 ngroups=4) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6666667 0.8866667)  fh_pressfree=2  rivnumb=0 cap=0.0028856 usalliance=0 interventions=0 crisis=0 polity2=8 ngroups=4) predict(nu0)

*Listing values of the covariates for Iceland and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Iceland ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==395 & year==1995
margins, at(newrank_attention_ratio=(.1901042 0)  fh_pressfree=2  rivnumb=0 cap=0.0000427 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.1901042 .4101042)  fh_pressfree=2  rivnumb=0 cap=0.0000427 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0) predict(nu0)

*Listing values of the covariates for Rep of Congo (Brazzaville) and then estimating the change in predicted deadly attacks from closing a Reuters bureau in in Rep of Congo (Brazzaville) ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==484 & year==1995
margins, at(newrank_attention_ratio=(.25 0.47)  fh_pressfree=0  rivnumb=2 cap=0.0003379 usalliance=0 interventions=0 crisis=0 polity2=5 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.25 0)  fh_pressfree=0  rivnumb=2 cap=0.0003379 usalliance=0 interventions=0 crisis=0 polity2=5 ngroups=0) predict(nu0)

*Listing values of the covariates for Laos and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Laos ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==812 & year==1995
margins, at(newrank_attention_ratio=(.2864583 0.0664583)  fh_pressfree=0  rivnumb=0 cap=0.0005836 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.2864583 0.5064583)  fh_pressfree=0  rivnumb=0 cap=0.0005836 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=0) predict(nu0)

*Listing values of the covariates for Uruguay and then estimating the change in predicted deadly attacks from closing a Reuters bureau in Uruguay ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 if strtloc==165 & year==1995
margins, at(newrank_attention_ratio=(.2942708 0.0742708)  fh_pressfree=2  rivnumb=0 cap=0.0005276 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0) predict(nu0)

*Estimating the change in predicted deadly attacks from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.2942708 0.5142708)  fh_pressfree=2  rivnumb=0 cap=0.0005276 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0) predict(nu0)




******************************************************************************************
**                                                                     			        **
**     Figure 4: Reducing Relative Press Attention by 20% Influences Casualties         **
**      Use data from these commands in Excel to create Figure 4             			**
******************************************************************************************

//Step one: estimate relationship between press attention and total casualties from deadly terrorist attacks
xtpoisson casualtylead newrank_attention_ratio c.newrank_attention_ratio#c.newrank_attention_ratio fh_pressfree rivnumb cap usalliance interventions crisis polity2 ngroups deadly_attacks_lead


*The predicted number of casualties at the minimum and maximum values of press attention for 1995
*margins if year==1995, at(newrank_attention_ratio=(.0052083 .989418))


//Step two: use stata margins command to estimate the change in predicted deadly attacks from reducing relative press attention by 20% in selected countries

*Listing values of the covariates for USA and then estimating the change in predicted casualties from closing a Reuters bureau in USA 
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==2 & year==1995
margins, at(newrank_attention_ratio=(.96875 0.75875) cap=0.1406412 polity2=10 fh_pressfree=2  rivnumb=10 cap=0.1406412 usalliance=0 interventions=0 crisis=1 polity2=10 ngroups=9 deadly_attacks_lead=1) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.96875 1) cap=0.1406412 polity2=10 fh_pressfree=2  rivnumb=10 cap=0.1406412 usalliance=0 interventions=0 crisis=1 polity2=10 ngroups=9 deadly_attacks_lead=1) predict(nu0)

*Listing values of the covariates for France and then estimating the change in predicted casualties from closing a Reuters bureau in France ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==220 & year==1995
margins, at(newrank_attention_ratio=(.9479167 0.7279167) cap=0.250185 polity2=9 fh_pressfree=2  rivnumb=2 cap=0.250185 usalliance=1 interventions=0 crisis=0 polity2=9 ngroups=9 deadly_attacks_lead=3) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.9479167 1) cap=0.250185 polity2=9 fh_pressfree=2  rivnumb=2 cap=0.250185 usalliance=1 interventions=0 crisis=0 polity2=9 ngroups=9 deadly_attacks_lead=3) predict(nu0)

*Listing values of the covariates for Indonesia and then estimating the change in predicted casualties from closing a Reuters bureau in Indonesia ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==850 & year==1995
margins, at(newrank_attention_ratio=(0.8958333 0.6758333) cap=0.141056 polity2=-7 fh_pressfree=0  rivnumb=0 cap=0.141056 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=9 deadly_attacks_lead=1) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.8958333 1) cap=0.141056 polity2=-7 fh_pressfree=0  rivnumb=0 cap=0.141056 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=9 deadly_attacks_lead=1) predict(nu0)

*Listing values of the covariates for China and then estimating the change in predicted casualties from closing a Reuters bureau in China ngroups=1
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==710 & year==1995
margins, at(newrank_attention_ratio=(.9322917 0.7122917) cap=0.1355899 polity2=-7 fh_pressfree=0  rivnumb=6 cap=0.1355899 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=1 deadly_attacks_lead=1) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.9322917 1) cap=0.1355899 polity2=-7 fh_pressfree=0  rivnumb=6 cap=0.1355899 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=1 deadly_attacks_lead=1) predict(nu0)

*Listing values of the covariates for Egypt and then estimating the change in predicted casualties from closing a Reuters bureau in Egypt ngroups=3
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==651 & year==1995
margins, at(newrank_attention_ratio=(.7916667 0.5716667) cap=0.0085745 polity2=-6 fh_pressfree=0  rivnumb=2 cap=0.0085745 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=3 deadly_attacks_lead=1) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.7916667 1) cap=0.0085745 polity2=-6 fh_pressfree=0  rivnumb=2 cap=0.0085745 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=3 deadly_attacks_lead=1) predict(nu0)

*Listing values of the covariates for Turkey and then estimating the change in predicted casualties from closing a Reuters bureau in Turkey ngroups=9
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==640 & year==1995
margins, at(newrank_attention_ratio=(.8385417 0.6185417) cap=0.0157004 polity2=8 fh_pressfree=0  rivnumb=7 cap=0.0157004 usalliance=1 interventions=0 crisis=0 polity2=8 ngroups=9 deadly_attacks_lead=4) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.8385417 1) cap=0.0157004 polity2=8 fh_pressfree=0  rivnumb=7 cap=0.0157004 usalliance=1 interventions=0 crisis=0 polity2=8 ngroups=9 deadly_attacks_lead=4) predict(nu0)

*Listing values of the covariates for Russia and then estimating the change in predicted casualties from closing a Reuters bureau in Russia ngroups=1
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==365 & year==1995
margins, at(newrank_attention_ratio=(.9270833 0.7070833) cap=0.0610809 polity2=3 fh_pressfree=1  rivnumb=12 cap=0.0610809 usalliance=0 interventions=0 crisis=0 polity2=3 ngroups=1 deadly_attacks_lead=2) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't increase higher than 1)
margins, at(newrank_attention_ratio=(.9270833 1) cap=0.0610809 polity2=3 fh_pressfree=1  rivnumb=12 cap=0.0610809 usalliance=0 interventions=0 crisis=0 polity2=3 ngroups=1 deadly_attacks_lead=2) predict(nu0)

*Listing values of the covariates for North Korea and then estimating the change in predicted casualties from closing a Reuters bureau in North Korea ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==731 & year==1995
margins, at(newrank_attention_ratio=(.6510417 0.4310417) cap=0.0114064 polity2=-10 fh_pressfree=0  rivnumb=3 cap=0.0114064 usalliance=0 interventions=0 crisis=1 polity2=-10 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6510417 0.8710417) cap=0.0114064 polity2=-10 fh_pressfree=0  rivnumb=3 cap=0.0114064 usalliance=0 interventions=0 crisis=1 polity2=-10 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Denmark and then estimating the change in predicted casualties from closing a Reuters bureau in Denmark ngroups=1
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==390 & year==1995
margins, at(newrank_attention_ratio=(.6875 0.4675) cap=0.0017194 polity2=10 fh_pressfree=2  rivnumb=0 cap=0.0017194 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=1 deadly_attacks_lead=1) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6875 0.9075) cap=0.0017194 polity2=10 fh_pressfree=2  rivnumb=0 cap=0.0017194 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=1 deadly_attacks_lead=1) predict(nu0)

*Listing values of the covariates for Nigeria and then estimating the change in predicted casualties from closing a Reuters bureau in Nigeria ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==475 & year==1995
margins, at(newrank_attention_ratio=(.6770833 0.4570833) cap=0.0070676 polity2=-6 fh_pressfree=0  rivnumb=2 cap=0.0070676 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6770833 0.8970833) cap=0.0070676 polity2=-6 fh_pressfree=0  rivnumb=2 cap=0.0070676 usalliance=0 interventions=0 crisis=1 polity2=-6 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Ukraine and then estimating the change in predicted casualties from closing a Reuters bureau in Ukraine ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==369 & year==1995
margins, at(newrank_attention_ratio=(.6197917 0.3997917) cap=0.0163135 polity2=7 fh_pressfree=1  rivnumb=1 cap=0.0163135 usalliance=0 interventions=0 crisis=0 polity2=7 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6197917 0.8397917) cap=0.0163135 polity2=7 fh_pressfree=1  rivnumb=1 cap=0.0163135 usalliance=0 interventions=0 crisis=0 polity2=7 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Chile and then estimating the change in predicted casualties from closing a Reuters bureau in Chile ngroups=4
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==155 & year==1995
margins, at(newrank_attention_ratio=(.6666667 0.4466667) cap=0.0028856 polity2=8 fh_pressfree=2  rivnumb=0 cap=0.0028856 usalliance=0 interventions=0 crisis=0 polity2=8 ngroups=4 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to
margins, at(newrank_attention_ratio=(.6666667 0.8866667)  cap=0.0028856 polity2=8 fh_pressfree=2  rivnumb=0 cap=0.0028856 usalliance=0 interventions=0 crisis=0 polity2=8 ngroups=4 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Iceland and then estimating the change in predicted casualties from closing a Reuters bureau in Iceland ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==395 & year==1995
margins, at(newrank_attention_ratio=(.1901042 0) cap=0.0000427 polity2=10 fh_pressfree=2 rivnumb=0 cap=0.0000427 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.1901042 .4101042) cap=0.0000427 polity2=10 fh_pressfree=2 rivnumb=0 cap=0.0000427 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Rep of Congo (Brazzaville) and then estimating the change in predicted casualties from closing a Reuters bureau in in Rep of Congo (Brazzaville) ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==484 & year==1995
margins, at(newrank_attention_ratio=(.25 0.47) cap=0.0003379 polity2=5 fh_pressfree=0  rivnumb=2 cap=0.0003379 usalliance=0 interventions=0 crisis=0 polity2=5 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.25 0) cap=0.0003379 polity2=5 fh_pressfree=0  rivnumb=2 cap=0.0003379 usalliance=0 interventions=0 crisis=0 polity2=5 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Laos and then estimating the change in predicted casualties from closing a Reuters bureau in Laos ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==812 & year==1995
margins, at(newrank_attention_ratio=(.2864583 0.0664583) cap=0.0005836 polity2=-7 fh_pressfree=0  rivnumb=0 cap=0.0005836 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.2864583 0.5064583) cap=0.0005836 polity2=-7 fh_pressfree=0  rivnumb=0 cap=0.0005836 usalliance=0 interventions=0 crisis=0 polity2=-7 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Listing values of the covariates for Uruguay and then estimating the change in predicted casualties from closing a Reuters bureau in Uruguay ngroups=0
list strtloc year newrank_attention_ratio bReuters fh_pressfree rivnumb cap usalliance interventions crisis polity2 deadly_attacks_lead if strtloc==165 & year==1995
margins, at(newrank_attention_ratio=(.2942708 0.0742708) cap=0.0005276 polity2=10 fh_pressfree=2  rivnumb=0 cap=0.0005276 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0 deadly_attacks_lead=0) predict(nu0)

*Estimating the change in predicted casualties from increasing press attention by the amount that opening a Reuters bureau would lead to (can't be less than 0)
margins, at(newrank_attention_ratio=(.2942708 0.5142708) cap=0.0005276 polity2=10 fh_pressfree=2  rivnumb=0 cap=0.0005276 usalliance=1 interventions=0 crisis=0 polity2=10 ngroups=0 deadly_attacks_lead=0) predict(nu0)


